package com.cnap.multiclouldmgmt.model.gpu;

import com.cnap.multiclouldmgmt.model.enums.RegionLocationEnum;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * gpu实例规格信息
 * 
 * @author tyj
 * @date 2022/11/17
 */
public class GpuFlavorInfo {
    /**
     * 云类型
     */
    private String cloudType;
    /**
     * 云区域
     */
    private String regionId;

    /**
     * 云区域描述
     */
    private String regionDescribe;
    /**
     * 可用区
     */
    private String zoneId;
    /**
     * 可用区描述
     */
    private String zoneDescribe;

    /**
     * 具体的大区位置，如华东，华南，华北，西南
     */
    private String regionLocation;

    private String flavorId;

    private String flavorDescribe;

    private String imageStr;

    private String diskTypeStr;

    private String gpuSpecStr;

    private Date createTime;

    private Date updateTime;

    private String accountName;

    /**
     * get
     *
     * @return AccountName
     */
    public String getAccountName() {
        return accountName;
    }

    /**
     * set
     *
     * @param accountName accountName
     */
    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    /**
     * get
     *
     * @return CloudType
     */
    public String getCloudType() {
        return cloudType;
    }

    /**
     * set
     *
     * @param cloudType cloudType
     */
    public void setCloudType(String cloudType) {
        this.cloudType = cloudType;
    }

    /**
     * get
     *
     * @return RegionId
     */
    public String getRegionId() {
        return regionId;
    }

    /**
     * set
     *
     * @param regionId regionId
     */
    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    /**
     * get
     *
     * @return RegionDescribe
     */
    public String getRegionDescribe() {
        return regionDescribe;
    }

    /**
     * set
     *
     * @param regionDescribe regionDescribe
     */
    public void setRegionDescribe(String regionDescribe) {
        this.regionDescribe = regionDescribe;
    }

    /**
     * get
     *
     * @return ZoneId
     */
    public String getZoneId() {
        return zoneId;
    }

    /**
     * set
     *
     * @param zoneId zoneId
     */
    public void setZoneId(String zoneId) {
        this.zoneId = zoneId;
    }

    /**
     * get
     *
     * @return ZoneDescribe
     */
    public String getZoneDescribe() {
        return zoneDescribe;
    }

    /**
     * set
     *
     * @param zoneDescribe zoneDescribe
     */
    public void setZoneDescribe(String zoneDescribe) {
        this.zoneDescribe = zoneDescribe;
    }

    /**
     * get
     *
     * @return FlavorId
     */
    public String getFlavorId() {
        return flavorId;
    }

    /**
     * set
     *
     * @param flavorId flavorId
     */
    public void setFlavorId(String flavorId) {
        this.flavorId = flavorId;
    }

    /**
     * get
     *
     * @return FlavorDescribe
     */
    public String getFlavorDescribe() {
        return flavorDescribe;
    }

    /**
     * set
     *
     * @param flavorDescribe flavorDescribe
     */
    public void setFlavorDescribe(String flavorDescribe) {
        this.flavorDescribe = flavorDescribe;
    }

    /**
     * get
     *
     * @return ImageStr
     */
    public String getImageStr() {
        return imageStr;
    }

    /**
     * set
     *
     * @param imageStr imageStr
     */
    public void setImageStr(String imageStr) {
        this.imageStr = imageStr;
    }

    /**
     * get
     *
     * @return DiskTypeStr
     */
    public String getDiskTypeStr() {
        return diskTypeStr;
    }

    /**
     * set
     *
     * @param diskTypeStr diskTypeStr
     */
    public void setDiskTypeStr(String diskTypeStr) {
        this.diskTypeStr = diskTypeStr;
    }

    /**
     * get
     *
     * @return GpuSpecStr
     */
    public String getGpuSpecStr() {
        return gpuSpecStr;
    }

    /**
     * set
     *
     * @param gpuSpecStr gpuSpecStr
     */
    public void setGpuSpecStr(String gpuSpecStr) {
        this.gpuSpecStr = gpuSpecStr;
    }

    /**
     * get
     *
     * @return CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * set
     *
     * @param createTime createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * get
     *
     * @return UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * set
     *
     * @param updateTime updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * get
     *
     * @return RegionLocation
     */
    public String getRegionLocation() {

        if (StringUtils.isEmpty(regionLocation)){
            regionLocation = RegionLocationEnum.getValueByRegionDescribe(regionDescribe);
        }
        return regionLocation;
    }

    /**
     * set
     *
     * @param regionLocation regionLocation
     */
    public void setRegionLocation(String regionLocation) {
        this.regionLocation = regionLocation;
    }

}
